<!--  -->
<template>
  <div>
    <ElderlyDetail></ElderlyDetail>
    <!-- <el-card style="margin-top: 20px;"> -->
    <el-radio-group v-model="type">
      <el-radio v-for="item in types" :value="item" size="large" border>{{item}}</el-radio>
  
    </el-radio-group>

     <component :id="id" :is="componentType[type]"></component>

  <!-- </el-card> -->
   </div>
</template>

<script lang='ts' setup>
import { reactive,toRefs,ref,onMounted} from 'vue'
import ScheduleDay from '../../components/elderly/ScheduleDay.vue';
import ScheduleMonth from '../../components/elderly/ScheduleMonth.vue';
import ScheduleWeek from '../../components/elderly/ScheduleWeek.vue';
import { useRoute } from 'vue-router';
const route = useRoute();

const type=ref("日循环");
const types=ref(['日循环','周循环','月循环'])

const id=ref(route.query.id);

const componentType:Record<string,any>={
  "日循环":ScheduleDay,
  "周循环":ScheduleWeek,
  "月循环":ScheduleMonth
}



</script>
<style scoped>
</style>
